<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:insert="~{_fragments :: headFragment}">
    <title>首页</title>
</head>

<body>


<!--导航-->
<nav class="ui inverted attached segment m-padded-tb-mini">
    <div th:insert="~{_fragments :: navFragment(1)}"></div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>


<!--中间内容-->
<div class="m-container m-padded-tb-big">
    <div class="ui container">
        <div class="ui stackable grid">

            <!--左边博客列表-->
            <div class="eleven wide column">

                <!--header-->
                <div class="ui top attached segment">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <h3 class="ui teal header">博客</h3>
                        </div>
                        <div class="right aligned column">
                            共
                            <h2 class="ui orange header m-inline-block m-text-thin"> z </h2>篇博客
                        </div>
                    </div>
                </div>

                <!--Content-->
                <div class="ui attached segment">

                    <div class="ui padded vertical segment m-padded-tb-large" th:each="blog:${lists}">
                        <div class="ui mobile reversed stackable grid">

                            <div class="eleven wide column">
                                <!--标题-->
                                <h3 class="ui header" th:text="${blog.title}"></h3>
                                <!--内容-->
<!--                                <p class="m-text" id="" th:text="${blog.content}"></p>-->
                                <div id="doc-content" th:text="${blog.content}" style="width: 80%">
                                    <textarea style="display:none;" placeholder="markdown"></textarea>
                                </div>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="https://unsplash.it/100/100?image=1005" alt=""
                                                     class="ui avatar image">
                                                <div class="content"><a href="#" class="header">王大双</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i><label
                                                    th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}"></label>
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i><label th:text="${blog.views}"></label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="right aligned five wide column">
                                        <a th:href="${'/blog/details?id='}+${blog.id}" target="_blank"
                                           class="ui teal basic label m-padded-tiny m-text-thin">认知升级</a>
                                    </div>
                                </div>
                            </div>

                            <div class="five wide column">
                                <a href="#" target="_blank">
                                    <img src="https://unsplash.it/800/450?image=1005" th:src="${blog.firstPicture}"
                                         alt="" class="ui rounded image">
                                </a>
                            </div>
                        </div>
                    </div>

                </div>

                <!--footer-->
                <div class="ui bottom attached segment">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <a href="#" class="ui mini teal basic button">上一页</a>
                        </div>
                        <div class="right aligned column">
                            <a href="#" class="ui mini teal basic button">下一页</a>
                        </div>
                    </div>
                </div>
            </div>

            <!--右边的top-->
            <div class="five wide column">

                <!--分类-->
                <div class="ui segments">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <i class="idea icon"></i>分类
                            </div>
                            <div class="right aligned column">
                                <a th:href="@{/nav/types}" target="_blank">more <i class="angle double right icon"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui teal segment">
                        <div class="ui fluid vertical menu">
                            <a href="#" class="item">
                                学习日志
                                <div class="ui teal basic left pointing label">13</div>
                            </a>

                            <a href="#" class="item">
                                学习日志
                                <div class="ui teal basic left pointing label">13</div>
                            </a>

                            <a href="#" class="item">
                                学习日志
                                <div class="ui teal basic left pointing label">13</div>
                            </a>

                            <a href="#" class="item">
                                学习日志
                                <div class="ui teal basic left pointing label">13</div>
                            </a>

                            <a href="#" class="item">
                                学习日志
                                <div class="ui teal basic left pointing label">13</div>
                            </a>

                            <a href="#" class="item">
                                学习日志
                                <div class="ui teal basic left pointing label">13</div>
                            </a>


                        </div>
                    </div>
                </div>

                <!--标签-->
                <div class="segments">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <i class="tags icon"></i>标签
                            </div>
                            <div class="right aligned column">
                                <a th:href="@{/nav/tages}" target="_blank">more <i class="angle double right icon"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui teal segment">
                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            方法论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            方法论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            方法论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            方法论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            方法论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            方法论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            方法论
                            <div class="detail">23</div>
                        </a>

                        <a href="#" target="_blank" class="ui teal basic left pointing label m-margin-tb-tiny">
                            方法论
                            <div class="detail">23</div>
                        </a>

                    </div>
                </div>

                <!--最新推荐 -->
                <div class="ui segments m-margin-top-large">
                    <div class="ui secondary segment">
                        <div class="column">
                            <i class="bookmark icon"></i>最新推荐
                        </div>
                        <div class="ui segment">
                            <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                        </div>

                        <div class="ui segment">
                            <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                        </div>

                        <div class="ui segment">
                            <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                        </div>

                        <div class="ui segment">
                            <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                        </div>

                        <div class="ui segment">
                            <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                        </div>

                        <div class="ui segment">
                            <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                        </div>

                        <div class="ui segment">
                            <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                        </div>

                        <div class="ui segment">
                            <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                        </div>

                    </div>
                </div>

                <!--二维码-->
                <h4 class="ui horizontal divider header m-margin-top-large">扫码关注我</h4>
                <div class="ui centered card" style="width: 15em;">
                    <img src="./static/images/wechat.jpg" alt="" class="ui rounded image">
                </div>


            </div>

        </div>
    </div>
</div>
<br>
<br>

<!--底部footer-->
<footer class="ui inverted vertical segment m-padded-tb-massive" th:insert="~{_fragments :: footerFragment}">
</footer>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>

<th:block th:insert="_fragments :: scriptFragment">
</th:block>

<link rel="stylesheet" th:href="@{/editormd/css/editormd.preview.css}" />
<script th:src="@{/editormd/lib/marked.min.js}"></script>
<script th:src="@{/editormd/lib/prettify.min.js}"></script>
<script th:src="@{/editormd/lib/raphael.min.js}"></script>
<script th:src="@{/editormd/lib/underscore.min.js}"></script>
<script th:src="@{/editormd/lib/sequence-diagram.min.js}"></script>
<script th:src="@{/editormd/lib/flowchart.min.js}"></script>
<script th:src="@{/editormd/lib/jquery.flowchart.min.js}"></script>
<script th:src="@{/editormd/editormd.min.js}"></script>

<script type="text/javascript">
    var testEditor;
    $(function () {
        testEditor = editormd.markdownToHTML("doc-content", {//注意：这里是上面DIV的id
            htmlDecode: "style,script,iframe",
            emoji: true,
            taskList: true,
            tocm: true,
            tex: true, // 默认不解析
            flowChart: true, // 默认不解析
            sequenceDiagram: true, // 默认不解析
            codeFold: true
        });
    });
</script>
</body>

</html>